#include <iostream>

using namespace std;

int main()
{
    long n = 0, x = 0;
    cin >> n >> x;

    int count = 0;
    while (n >= (2 * x))
    {
        n /= 2;
        ++count;
    }
    while (n > 0)
    {
        n -= x;
        ++count;
    }
    cout << count << endl;
    return 0;
}